document.addEventListener('DOMContentLoaded', function () {
            const links = document.querySelectorAll('.sidebar a');
            const pages = document.querySelectorAll('.page');

            function showManagerCourses() {
                let targetId = 'manager-courses';
                let targetPage = document.getElementById(targetId);

                pages.forEach(page => {
                    page.classList.remove('active');
                });

                targetPage.classList.add('active');
            }

            links.forEach(link => {
                link.addEventListener('click', function (e) {
                    e.preventDefault();
                    let targetId = this.getAttribute('href').substring(1);
                    let targetPage = document.getElementById(targetId);

                    pages.forEach(page => {
                        page.classList.remove('active');
                    });

                    targetPage.classList.add('active');
                });
            });

            // 在页面加载完成后显示课程管理页面
            showManagerCourses();
        });